package cn.yj.register;

import java.util.HashSet;
import java.util.Set;

/**
 * @author 永健
 * @since 2022-01-18 16:14
 */
public class Provider {

	private String applicationName;

	/**
	 * ip:127.0.0.1
	 */
	private String host;

	/**
	 * ip:port
	 */
	private String address;

	private Set<String> beanNames = new HashSet<>();

	private Set<String> classBeanNames = new HashSet<>();

	/**
	 * 8080
	 */
	private int port;

	public String getAddress() {
		return address;
	}

	public Provider setAddress(String address) {
		this.address = address;
		return this;
	}

	public Provider(String applicationName, String host, int port) {
		this.applicationName = applicationName;
		this.host = host;
		this.address = host + ":" + port;
		this.port = port;
	}

	public Set<String> getBeanNames() {
		return beanNames;
	}

	public Provider setBeanNames(Set<String> beanNames) {
		this.beanNames = beanNames;
		return this;
	}

	public Set<String> getClassBeanNames() {
		return classBeanNames;
	}

	public Provider setClassBeanNames(Set<String> classBeanNames) {
		this.classBeanNames = classBeanNames;
		return this;
	}

	public String getApplicationName() {
		return applicationName;
	}

	public Provider setApplicationName(String applicationName) {
		this.applicationName = applicationName;
		return this;
	}

	public String getHost() {
		return host;
	}

	public Provider setHost(String host) {
		this.host = host;
		return this;
	}

	public int getPort() {
		return port;
	}

	public Provider setPort(int port) {
		this.port = port;
		return this;
	}
}
